import request from '@/utils/request'

/**
 * 厂家信息查询
 */
export function getList() {
  return request({
    url: '/cms/equipmentProducer/list',
    method: 'get'
  })
}

/**
 * 状态信息查询
 */
export function getStates() {
  return request({
    url: '/cms/equipmentDivceAttr/getStates',
    method: 'get'
  })
}

/**
 * 厂家信息查询
 */
export function getListPage(params) {
  return request({
    url: '/cms/equipmentProducer/listPage',
    method: 'get',
    params: params
  })
}

/**
 * 厂家信息查询
 */
export function getTypeListPage(params) {
  return request({
    url: '/cms/equipmentDivceAttr/getTypeList',
    method: 'get',
    params: params
  })
}

/**
 * 根据id获取分类信息
 */
export function getById(id) {
  return request({
    url: `/cms/equipmentClassType/getById/${id}`,
    method: 'get'
  })
}

export function line(params) {
  return request({
    url: '/cms/common/getLineListByDept',
    method: 'get',
    params: params
  })
}

/**
 * 获取下拉框段
 */
export function getListSection(params) {
  return request({
    url: '/cms/common/getListSection',
    method: 'get',
    params: params
  })
}
// 选择支柱（分页）
export function pillarList(query) {
  return request({
    url: '/basic/pillar/list/',
    method: 'GET',
    params: query
  })
}

// 获取线路所在区站
export function getSiteListByLineId(query) {
  return request({
    url: `/jjxtapi/basic/site/findAllSiteByLineIdAndSiteId`,
    method: 'get',
    params: query
  })
}

// 获取支柱号
export function getPillarList(query) {
  return request({
    url: `/jjxtapi/basic/pillar/findPillarList`,
    method: 'get',
    params: query
  })
}

// 获取线路数据
export function getLineList(query) {
  return request({
    url: '/jjxtapi/basic/line',
    method: 'get',
    params: query
  })
}

// 获取部门树
export function getDeptTree(query) {
  return request({
    url: '/jjxtapi/basic/findManageDeptTree',
    method: 'get',
    params: query
  })
}

